import Vue from 'vue';
import router from '@/router';
Vue.directive('back', {
  inserted: function (el, {value}) {
    el.addEventListener('click', () => {
      if (value == 'home') {
        //backToName('user');
      } else if (value) {
        //backToName(value);
      } else {
        router.back();
      }
    });
  }
});

Vue.directive('focus', {
  inserted (el) {
    el.focus();
  }
});
